.features {
  padding: 5rem 0;
  width: 100%;
}

.sectionHeader {
  max-width: 760px;
  margin: 0 auto 3rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sectionEyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--ifm-color-primary);
  margin: 0;
  font-size: 0.9rem;
}

.sectionTitle {
  font-size: 2.25rem;
  margin: 0;
}

.sectionDescription {
  margin: 0;
  color: var(--ifm-color-emphasis-700);
  line-height: 1.7;
}

.featuresGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.featureCard {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.96),
    rgba(245, 247, 253, 0.9)
  );
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 16px;
  padding: 1.5rem;
  height: 100%;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    opacity 0.2s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.04);
}

.featureCard::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 20% 20%,
    rgba(95, 106, 252, 0.06),
    transparent 45%
  );
  opacity: 0;
  transition: opacity 0.25s ease;
}

.featureCard::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: conic-gradient(
    from 110deg,
    rgba(95, 106, 252, 0.18),
    rgba(255, 79, 143, 0.12),
    rgba(255, 255, 255, 0.18),
    rgba(95, 106, 252, 0.12)
  );
  opacity: 0;
  transition: opacity 0.25s ease;
  mix-blend-mode: screen;
  pointer-events: none;
}

.featureCard:hover {
  transform: translateY(-1px);
  border-color: rgba(95, 106, 252, 0.2);
  box-shadow:
    0 10px 18px rgba(0, 0, 0, 0.06),
    0 8px 24px rgba(95, 106, 252, 0.08);
}

.featureCard:hover::before {
  opacity: 1;
}

.featureCard:hover::after {
  opacity: 0.22;
}

html[data-theme='dark'] .featureCard {
  background: linear-gradient(
    145deg,
    rgba(22, 30, 46, 0.88),
    rgba(30, 41, 59, 0.7)
  );
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.32);
}

html[data-theme='dark'] .featureCard:hover {
  border-color: rgba(95, 106, 252, 0.32);
  box-shadow:
    0 14px 26px rgba(0, 0, 0, 0.34),
    0 0 24px rgba(95, 106, 252, 0.12);
}

.featureHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.emoji {
  font-size: 1.9rem;
  background: rgba(99, 102, 241, 0.12);
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.category {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--ifm-color-primary-darkest);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.8rem;
}

.featureTitle {
  font-size: 1.3rem;
  margin: 0 0 0.5rem;
}

.featureDescription {
  margin: 0;
  color: var(--ifm-color-emphasis-700);
  line-height: 1.6;
}

html[data-theme='dark'] .sectionDescription,
html[data-theme='dark'] .featureDescription {
  color: #cbd5e1;
}

html[data-theme='dark'] .category {
  background: rgba(129, 140, 248, 0.16);
  color: var(--ifm-color-primary-lightest);
}

@media screen and (max-width: 768px) {
  .features {
    padding: 4rem 0;
  }

  .featuresGrid {
    gap: 1.2rem;
  }

  .featureCard {
    padding: 1.25rem;
  }
}

@media screen and (max-width: 540px) {
  .features {
    padding: 3.5rem 0;
  }

  .sectionHeader {
    margin-bottom: 2.25rem;
    padding: 0 0.5rem;
  }

  .featuresGrid {
    grid-template-columns: 1fr;
  }
}
